import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 斐波那契数列
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-04-18  19:01
 */
public class Test6 {
    //利用迭代（循环）
    public static int fib(int n) {
        if(n == 1 || n ==2) {
            return 1;
        }else {
            int f1 = 1;
            int f2 = 1;
            int sum = 0;
            for (int i = 3; i <= n; i++) {
                sum = f1 +f2;
                f1 = f2;
                f2 = sum;
            }
            return sum;
        }
    }
    //效率过低
    /*public static int fib(int n) {
        if(n ==1 || n ==2) {
            return 1;
        } else {
            return fib(n-1) + fib(n-2);
        }
    }*/
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(fib(n));
        scanner.close();
    }
}
